package com.ruoyi.xp.order.mapstruct;

import com.ruoyi.xp.order.domain.*;
import com.ruoyi.xp.order.dto.*;
import org.mapstruct.Mapper;

/**
 * @author chendx
 */
@Mapper(componentModel = "spring")
public interface OrderMap {

    /**
     * 将虾皮订单报文转换成entity
     *
     * @param orderDto
     * @return
     */
    Order mapOrderDtoToEntity(OrderDto orderDto);

    /**
     * 将虾皮订单对象转换成dto
     *
     * @param order
     * @return
     */
    OrderDto mapOrderEntityToDto(Order order);

    /**
     * 将虾皮订单收入明细报文转换成entity
     *
     * @param orderIncomeDto
     * @return
     */
    OrderIncome mapOrderIncomeDtoToEntity(OrderIncomeDto orderIncomeDto);

    /**
     * 将虾皮订单收入明细报文转换成dto
     *
     * @param orderIncome
     * @return
     */
    OrderIncomeDto mapOrderIncomeEntityToDto(OrderIncome orderIncome);

    /**
     * 将虾皮订单商品明细信息报文转换成entity
     *
     * @param orderItemDto
     * @return
     */
    OrderItem mapOrderItemDtoToEntity(OrderItemDto orderItemDto);

    /**
     * 将虾皮订单商品明细信息报文转换成Dto
     *
     * @param orderItem
     * @return
     */
    OrderItemDto mapOrderItemEntityToDto(OrderItem orderItem);

    /**
     * 将虾皮订单明细仓库货物信息报文转换成entity
     *
     * @param orderItemGoodsDto
     * @return
     */
    OrderItemGoods mapOrderItemGoodsDtoToEntity(OrderItemGoodsDto orderItemGoodsDto);

    /**
     * 将虾皮订单明细外部采购货物信息对象报文转换成entity
     *
     * @param orderItemHeadPackageDto
     * @return
     */
    OrderItemHeadPackage mapOrderItemHeadPackageDtoToEntity(OrderItemHeadPackageDto orderItemHeadPackageDto);
}
